<!-- Tommy -->
<title>员工信息管理</title>

<link rel="stylesheet" href="lib/assets/css/jquery-ui.custom.css" />
<link rel="stylesheet" href="lib/assets/css/chosen.css" />
<link rel="stylesheet" href="lib/assets/css/datepicker.css" />
<link rel="stylesheet" href="lib/assets/css/bootstrap-timepicker.css" />
<link rel="stylesheet" href="lib/assets/css/daterangepicker.css" />
<link rel="stylesheet"
	href="lib/assets/css/bootstrap-datetimepicker.css" />
<link rel="stylesheet" href="lib/assets/css/colorpicker.css" />
<link rel="stylesheet" href="css/align.css" />
<!-- ajax layout which only needs content area -->
<div class="page-header">
	<h1>
		用户管理
		<small> <i class="ace-icon fa fa-angle-double-right"></i>
			员工信息管理 </small>
	</h1>

</div>
<!-- /.page-header -->

<div class="holyContainer">
	<div class="row" data-ng-app="reportSearchApp"
	data-ng-controller="reportSearchController">
	<div class="col-xs-12">
		<!-- PAGE CONTENT BEGINS -->
		<div class="row">
			<div class="col-xs-12">
				<div class="widget-box">
					<div class="widget-header">
						<h4 class="widget-title">
							查询条件
						</h4>
						<span class="widget-toolbar"> 
							<a class="btn btn-primary btn-xs emp_search_btn">搜索</a> 
							<a class="btn btn-xs emp_reset_btn">重置</a>
						</span>
					</div>

					<div class="widget-body" style="display: block;">
						<div class="widget-main">
							<form role="search" method="get" id="report-search-form">
								<div class="row">
									<div class="col-xs-12 col-sm-6 col-lg-4 col-lg-push-2">
										<label class="control-label" for="taskInfo">
											姓名
										</label>
										<input name="taskInfo" type="text" id="taskInfo" value=""
											class="form-control emp_search_name_field"
											data-ng-model="formElements.taskInfo" />
										<div class="hr hr8"></div>
										
										<label for="dateRange">
											入职日期范围
										</label>
										<div class="input-group">
											<span class="input-group-addon"> <i
												class="fa fa-calendar bigger-110"></i> </span>
											<input class="form-control  text-center emp_search_date_range_field" type="text"
												name="dateRange"
												id="dateRange" data-ng-model="formElements.dateRange"/>
										</div>
										<div class="hr hr8 visible-xs-block"></div>
									</div>

									<div class="col-xs-12 col-sm-6 col-lg-4 col-lg-push-2">
										<label for="prpSelect">
											部门
										</label>
										<select name="prpSelect" class="form-control emp_search_dep_field" id="prpSelect"
											data-ng-model="formElements.prpSelect"
											data-ng-options=" prpSelect.id as prpSelect.abbr+'-'+prpSelect.name for prpSelect in formRanges.prp">
											<option class="dep_all" value="" selected>所有</option>
										</select>
										
										<div class="hr hr8"></div>

										<label for="approveState">
											是否离职
										</label>

										<select name="approveState" class="form-control emp_search_leave_field"
											id="approveState" data-ng-model="formElements.approveState"
											data-ng-options=" approveState.id as approveState.name for approveState in formRanges.state"
											data-ng-change="updateReportSearchForm()">

											<option value="" selected class="leave_select">所有</option>
											<option value="是" >是</option>
											<option value="否" >否</option>
										</select>
									</div>
								</div>
								
								<input class="page_num" type="hidden" value="1" />
								
							</form>
						</div>
					</div>
				</div>

			</div>
		</div>

		<div class="hr hr-double hr-dotted hr10"></div>
		<div id="alert">
		</div>

	</div>
	</div>

		
		<div class="alert_container row col-xs-8"></div>
	
	<div class="hr hr-double hr-dotted hr10"></div>

	<div class="drm_search_container"></div>
	
</div>

<div class="drm_view_container"></div>

<script type="text/javascript" src="js/emp.manage.js"></script>


<script type="text/javascript">

var scripts = [ null, "lib/assets/js/jquery.validate.js",
		"lib/assets/js/jquery-ui.custom.js",
		"lib/assets/js/jquery.ui.touch-punch.js",
		"lib/assets/js/chosen.jquery.js",
		"lib/assets/js/fuelux/fuelux.spinner.js",
		"lib/assets/js/date-time/bootstrap-datepicker.js",
		"lib/assets/js/date-time/bootstrap-timepicker.js",
		"lib/assets/js/date-time/moment.js",
		"lib/assets/js/date-time/daterangepicker.js",
		"lib/assets/js/date-time/bootstrap-datetimepicker.js",
		"lib/assets/js/bootstrap-colorpicker.js",
		"lib/assets/js/jquery.knob.js", "lib/assets/js/jquery.autosize.js",
		"lib/assets/js/jquery.inputlimiter.1.3.1.js",
		"lib/assets/js/jquery.maskedinput.js",
		"lib/assets/js/bootstrap-tag.js", null ]

		$('.page-content-area').ace_ajax(
		'loadScripts',
		scripts,
		function() {
			//inline scripts related to this page
			jQuery(function($) {
				var active_class = 'active';
				$('#menu-management-table').find(
						'> thead > tr > th input[type=checkbox]').eq(0).on(
						'click', function() {
							console.log("first");
							var th_checked = this.checked;//checkbox inside "TH" table header

						$(this).closest('table').find('tbody > tr').each(
								function() {
									var row = this;
									if (th_checked)
										$(row).addClass(active_class).find(
												'input[type=checkbox]').eq(0)
												.prop('checked', true);
									else
										$(row).removeClass(active_class).find(
												'input[type=checkbox]').eq(0)
												.prop('checked', false);
								});
					});
				//select/deselect a row when the checkbox is checked/unchecked
				$('#menu-management-table').on('click',
						'td input[type=checkbox]', function() {
							console.log("2nd");
							var $row = $(this).closest('tr');
							if (this.checked)
								$row.addClass(active_class);
							else
								$row.removeClass(active_class);
						});//add an active class to tr element

				$('input[name=dateRange]').daterangepicker( {
					'applyClass' : 'btn-sm btn-success',
					'cancelClass' : 'btn-sm btn-default',
					locale : {
						applyLabel : '选择',
						cancelLabel : '取消'
					}
				}).prev().on(ace.click_event, function() {
					$(this).next().focus();
				});

			});

		});
</script>